
//Picking up items.
obj/small

	proc
		pickup()	//call this when the item is picked up.
			if(!src)
				return
			if(!usr)
				return

			if(src.owner)	//if it has an owner
				if(!ismob(src.loc))
					src.owner = null
					src.last_owner = usr.ckey
				else
					return	//its in fact being owned

			if(src.Move(usr))
				src.owner = usr.ckey
				debug("[d_t][src.name]'s owner is now [src.owner]")


		drop()

		//force
		force_pickup()
		force_drop()

	//picking up items.
	Click(location, control, params)
		if(control == "infowindow.info")
			usr<<""
			usr<<"<b>[src.name]</b>"
			usr<<src.desc

		if(control != "mapwindow.map")
			return
		//only allow clicking on the map

		var
			turf/home = get_turf(usr)
			turf/target = get_turf(src)
		if(get_dist(home, target) <= 1)
			src.pickup()


